package com.tengju.data.infrastructure.persistence.mybatis.mapper.clickhouse.crm;

import com.tengju.data.domain.model.analysis.Row;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

public interface DwsCrmBrandAnalysisDMapper {

    int count(@Param("dominationIdCode") Long dominationIdCode,@Param("dominationLevel") Integer dominationLevel,@Param("starLevels") List<Integer> starLevels,
                  @Param("idCodes") List<Long> idCodes,@Param("month") Integer month,@Param("quarter") Integer quarter,@Param("brandId") Long brandId, @Param("saleMoneyFrom") BigDecimal saleMoneyFrom,
                  @Param("saleMoneyTo") BigDecimal saleMoneyTo,@Param("isDirect") Integer isDirect,@Param("sqlGmvField") String sqlGmvField,@Param("sqlRankField") String sqlRankField,@Param("monthQuarter") Integer monthQuarter);

    BigDecimal totalSaleMoney(@Param("dominationIdCode") Long dominationIdCode,@Param("dominationLevel") Integer dominationLevel,@Param("starLevels") List<Integer> starLevels,
                @Param("idCodes") List<Long> idCodes,@Param("month") Integer month,@Param("brandId") Long brandId, @Param("saleMoneyFrom") BigDecimal saleMoneyFrom,
                @Param("saleMoneyTo") BigDecimal saleMoneyTo,@Param("isDirect") Integer isDirect,@Param("sqlGmvField") String sqlGmvField,@Param("quarter") Integer quarter,
                @Param("compareQuarter") Integer compareQuarter,@Param("monthQuarter") Integer monthQuarter,@Param("sqlRankField") String sqlRankField);

    List<HashMap<String, Object>> brandAnalysis(@Param("dominationIdCode") Long dominationIdCode, @Param("dominationLevel") Integer dominationLevel, @Param("starLevels") List<Integer> starLevels,
                                                @Param("idCodes") List<Long> idCodes, @Param("month") Integer month, @Param("compareMonth") Integer compareMonth,@Param("quarter") Integer quarter,
                                                @Param("compareQuarter") Integer compareQuarter, @Param("brandId") Long brandId, @Param("saleMoneyFrom") BigDecimal saleMoneyFrom,
                                                @Param("saleMoneyTo") BigDecimal saleMoneyTo, @Param("isDirect") Integer isDirect, @Param("sqlRankField") String sqlRankField,
                                                @Param("sqlDealerMemberField") String sqlDealerMemberField, @Param("sqlGmvField") String sqlGmvField,
                                                @Param("crmRankCrowdPerspective") Integer crmRankCrowdPerspective,@Param("sortType") String sortType,
                                                @Param("offset") Integer offset, @Param("pageSize") Integer pageSize,@Param("monthQuarter") Integer monthQuarter);

}
